<script setup>
import { onBeforeUnmount, onMounted } from 'vue';
console.log('1.组件创建前就执行');//先执行

onMounted(() => {
  console.log(' 2.组件挂载完成');

})
onBeforeUnmount(()=>{
  console.log('3.组件销毁前执行');

})
</script>
<template>
<h1>生命周期函数</h1>
</template>
<style>
</style>
